<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/jquery.js"></script>
</head>
<body>
 <button id="test">test</button>
<script>
    $('#test').click(function() {
        $.post('/api/login1', {username: 'admin', password: '123456'}, function(res) {
            console.log('res', res)
        }).error(function () {
            console.log('网络错误，请重试');
        }).complete(function () {
            console.log('complete')
        })
    })
</script>
</body>
</html>